<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateAppageListdatasTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('appage_listdatas', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('apppage_id')->default(0)->nullable()->unsigned()->comment('页面ID');
            $table->string('area', 100)->comment('区位编号');
            $table->integer('listtpl_id')->default(0)->unsigned()->comment('列表模板');
            $table->integer('data_id')->default(0)->unsigned()->comment('数据类型ID');
            $table->integer('resource_data_id')->default(0)->unsigned()->comment('数据ID');
            $table->string('name')->nullable()->comment('名称');
            $table->string('title')->nullable()->comment('标题');
            $table->string('subtitle')->nullable()->comment('副标题');
            $table->string('img', 191)->nullable()->comment('推荐图');
            $table->string('param')->nullable()->comment('参数');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('appage_listdatas');
    }
}
